import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path: '/',redirect:'/login'},
    {path:"/login",component:() => import('../views/Login.vue'),},
    // 学生页面
    {path:"/notice",component:() => import('../views/Student/MbtiNotice.vue'),},
    {path:"/mbtitest",component:() => import('../views/Student/MbtiTest.vue'),},
    {path:"/mbti/:type",component:() => import('../views/Student/MbtiDetail.vue'),},
    {path:"/mbtihistory",component:() => import('../views/Student/MbtiHistory.vue'),},
    // 管理员页面
    {path:"/layout",component:() => import('../views/Admin/Layout.vue'),redirect: '/layout/college',children:[
      {path:"college",name:'college',component:() => import('../views/Admin/College.vue'),},
      {path:"major",name:'major',component:() => import('../views/Admin/Major.vue'),},
      {path:"class",name:'class',component:() => import('../views/Admin/Class.vue'),},
      {path:"teacher",name:'teacher',component:() => import('../views/Admin/Teacher.vue'),},
      {path:"student",name:'student',component:() => import('../views/Admin/Student.vue'),},
      {path:"questions",component:() => import('../views/Admin/Questions.vue'),},
    ]},
    // 老师页面
    {path:"/classmbtiresult",component:() => import('../views/Teacher/ClassMbtiResult.vue'),},
  ],
})

export default router
